<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">11063</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-05-21T17:16:28-04:00</created-at>
  <creator-id type="integer">11063</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer">40246</milestone-id>
  <number type="integer">6</number>
  <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
  <priority type="integer">1</priority>
  <project-id type="integer">30941</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag nil="true"></tag>
  <title>Occurence enumeration should preserve type of datetimes</title>
  <updated-at type="datetime">2009-05-21T19:31:39-04:00</updated-at>
  <user-id type="integer">11063</user-id>
  <user-name>Rick DeNatale</user-name>
  <creator-name>Rick DeNatale</creator-name>
  <assigned-user-name>Rick DeNatale</assigned-user-name>
  <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
  <milestone-title>0.0.9</milestone-title>
  <original-body>This came out of a question from Bruno in response to Ticket #3

In attempting to understand his problem I wrote this test program

@@@ ruby
require 'rubygems'
require 'ri_cal'

cal = RiCal.parse_string &lt;&lt;ENDCAL
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20090520T091929Z
LAST-MODIFIED:20090520T092025Z
DTSTAMP:20090520T091929Z
UID:36197790-cf15-4aba-9213-f61d434c4cd8
SUMMARY:event1
DTSTART;VALUE=DATE:20090601
DTEND;VALUE=DATE:20090602
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
CREATED:20090520T092032Z
LAST-MODIFIED:20090520T092052Z
DTSTAMP:20090520T092032Z
UID:d41c124a-65c3-400e-bd04-1d2ee7b98352
SUMMARY:event2
RRULE:FREQ=MONTHLY;INTERVAL=1
DTSTART;VALUE=DATE:20090603
DTEND;VALUE=DATE:20090604
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
ENDCAL
puts &quot;occurrences of first event:&quot;
cal.first.events.first.occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each  do|occur|
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
puts &quot;\noccurrences of second event&quot;
cal.first.events[1].occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each do |occur| 
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
@@@

which produces the following output:

  occurrences of first event:
  2009-06-01 which is a Date

  occurrences of second event
  2009-06-03T00:00:00+00:00 which is a DateTime
  2009-07-03T00:00:00+00:00 which is a DateTime
  2009-08-03T00:00:00+00:00 which is a DateTime
  2009-09-03T00:00:00+00:00 which is a DateTime
  2009-10-03T00:00:00+00:00 which is a DateTime
  2009-11-03T00:00:00+00:00 which is a DateTime
  2009-12-03T00:00:00+00:00 which is a DateTime

The first event gives a date dtstart because it has no recurrence rules, the second event, which does have a recurrence rule, is changing the type of the dtstart to DateTime.  This should be fixed.</original-body>
  <latest-body>This came out of a question from Bruno in response to Ticket #3

In attempting to understand his problem I wrote this test program

@@@ ruby
require 'rubygems'
require 'ri_cal'

cal = RiCal.parse_string &lt;&lt;ENDCAL
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20090520T091929Z
LAST-MODIFIED:20090520T092025Z
DTSTAMP:20090520T091929Z
UID:36197790-cf15-4aba-9213-f61d434c4cd8
SUMMARY:event1
DTSTART;VALUE=DATE:20090601
DTEND;VALUE=DATE:20090602
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
CREATED:20090520T092032Z
LAST-MODIFIED:20090520T092052Z
DTSTAMP:20090520T092032Z
UID:d41c124a-65c3-400e-bd04-1d2ee7b98352
SUMMARY:event2
RRULE:FREQ=MONTHLY;INTERVAL=1
DTSTART;VALUE=DATE:20090603
DTEND;VALUE=DATE:20090604
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
ENDCAL
puts &quot;occurrences of first event:&quot;
cal.first.events.first.occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each  do|occur|
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
puts &quot;\noccurrences of second event&quot;
cal.first.events[1].occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each do |occur| 
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
@@@

which produces the following output:

  occurrences of first event:
  2009-06-01 which is a Date

  occurrences of second event
  2009-06-03T00:00:00+00:00 which is a DateTime
  2009-07-03T00:00:00+00:00 which is a DateTime
  2009-08-03T00:00:00+00:00 which is a DateTime
  2009-09-03T00:00:00+00:00 which is a DateTime
  2009-10-03T00:00:00+00:00 which is a DateTime
  2009-11-03T00:00:00+00:00 which is a DateTime
  2009-12-03T00:00:00+00:00 which is a DateTime

The first event gives a date dtstart because it has no recurrence rules, the second event, which does have a recurrence rule, is changing the type of the dtstart to DateTime.  This should be fixed.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;This came out of a question from Bruno in response to Ticket
&lt;a href=&quot;/projects/30941/tickets/3&quot; title=&quot;Ticket #3&quot;&gt;#3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In attempting to understand his problem I wrote this test
program&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
require 'rubygems'
require 'ri_cal'

cal = RiCal.parse_string &amp;lt;&amp;lt;ENDCAL
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20090520T091929Z
LAST-MODIFIED:20090520T092025Z
DTSTAMP:20090520T091929Z
UID:36197790-cf15-4aba-9213-f61d434c4cd8
SUMMARY:event1
DTSTART;VALUE=DATE:20090601
DTEND;VALUE=DATE:20090602
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
CREATED:20090520T092032Z
LAST-MODIFIED:20090520T092052Z
DTSTAMP:20090520T092032Z
UID:d41c124a-65c3-400e-bd04-1d2ee7b98352
SUMMARY:event2
RRULE:FREQ=MONTHLY;INTERVAL=1
DTSTART;VALUE=DATE:20090603
DTEND;VALUE=DATE:20090604
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
ENDCAL
puts &amp;quot;occurrences of first event:&amp;quot;
cal.first.events.first.occurrences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(&amp;quot;01/01/2010&amp;quot;)).each  do|occur|
  puts &amp;quot;#{occur.dtstart} which is a #{occur.dtstart.class}&amp;quot;
end
puts &amp;quot;\noccurrences of second event&amp;quot;
cal.first.events[1].occurrences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(&amp;quot;01/01/2010&amp;quot;)).each do |occur| 
  puts &amp;quot;#{occur.dtstart} which is a #{occur.dtstart.class}&amp;quot;
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which produces the following output:&lt;/p&gt;
&lt;p&gt;occurrences of first event: 2009-06-01 which is a Date&lt;/p&gt;
&lt;p&gt;occurrences of second event 2009-06-03T00:00:00+00:00 which is a
DateTime 2009-07-03T00:00:00+00:00 which is a DateTime
2009-08-03T00:00:00+00:00 which is a DateTime
2009-09-03T00:00:00+00:00 which is a DateTime
2009-10-03T00:00:00+00:00 which is a DateTime
2009-11-03T00:00:00+00:00 which is a DateTime
2009-12-03T00:00:00+00:00 which is a DateTime&lt;/p&gt;
&lt;p&gt;The first event gives a date dtstart because it has no
recurrence rules, the second event, which does have a recurrence
rule, is changing the type of the dtstart to DateTime. This should
be fixed.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This came out of a question from Bruno in response to Ticket #3

In attempting to understand his problem I wrote this test program

@@@ ruby
require 'rubygems'
require 'ri_cal'

cal = RiCal.parse_string &lt;&lt;ENDCAL
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20090520T091929Z
LAST-MODIFIED:20090520T092025Z
DTSTAMP:20090520T091929Z
UID:36197790-cf15-4aba-9213-f61d434c4cd8
SUMMARY:event1
DTSTART;VALUE=DATE:20090601
DTEND;VALUE=DATE:20090602
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
CREATED:20090520T092032Z
LAST-MODIFIED:20090520T092052Z
DTSTAMP:20090520T092032Z
UID:d41c124a-65c3-400e-bd04-1d2ee7b98352
SUMMARY:event2
RRULE:FREQ=MONTHLY;INTERVAL=1
DTSTART;VALUE=DATE:20090603
DTEND;VALUE=DATE:20090604
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
ENDCAL
puts &quot;occurrences of first event:&quot;
cal.first.events.first.occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each  do|occur|
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
puts &quot;\noccurrences of second event&quot;
cal.first.events[1].occurrences(:after =&gt; Date.parse('01/01/1990'), :before =&gt; Date.parse(&quot;01/01/2010&quot;)).each do |occur| 
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
@@@

which produces the following output:

  occurrences of first event:
  2009-06-01 which is a Date

  occurrences of second event
  2009-06-03T00:00:00+00:00 which is a DateTime
  2009-07-03T00:00:00+00:00 which is a DateTime
  2009-08-03T00:00:00+00:00 which is a DateTime
  2009-09-03T00:00:00+00:00 which is a DateTime
  2009-10-03T00:00:00+00:00 which is a DateTime
  2009-11-03T00:00:00+00:00 which is a DateTime
  2009-12-03T00:00:00+00:00 which is a DateTime

The first event gives a date dtstart because it has no recurrence rules, the second event, which does have a recurrence rule, is changing the type of the dtstart to DateTime.  This should be fixed.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This came out of a question from Bruno in response to Ticket
&lt;a href=&quot;/projects/30941/tickets/3&quot; title=&quot;Ticket #3&quot;&gt;#3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In attempting to understand his problem I wrote this test
program&lt;/p&gt;
&lt;pre&gt;
&lt;code class=&quot;ruby&quot;&gt;require 'rubygems'
require 'ri_cal'

cal = RiCal.parse_string &amp;lt;&amp;lt;ENDCAL
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20090520T091929Z
LAST-MODIFIED:20090520T092025Z
DTSTAMP:20090520T091929Z
UID:36197790-cf15-4aba-9213-f61d434c4cd8
SUMMARY:event1
DTSTART;VALUE=DATE:20090601
DTEND;VALUE=DATE:20090602
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
CREATED:20090520T092032Z
LAST-MODIFIED:20090520T092052Z
DTSTAMP:20090520T092032Z
UID:d41c124a-65c3-400e-bd04-1d2ee7b98352
SUMMARY:event2
RRULE:FREQ=MONTHLY;INTERVAL=1
DTSTART;VALUE=DATE:20090603
DTEND;VALUE=DATE:20090604
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
ENDCAL
puts &quot;occurrences of first event:&quot;
cal.first.events.first.occurrences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(&quot;01/01/2010&quot;)).each  do|occur|
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end
puts &quot;\noccurrences of second event&quot;
cal.first.events[1].occurrences(:after =&amp;gt; Date.parse('01/01/1990'), :before =&amp;gt; Date.parse(&quot;01/01/2010&quot;)).each do |occur| 
  puts &quot;#{occur.dtstart} which is a #{occur.dtstart.class}&quot;
end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;which produces the following output:&lt;/p&gt;
&lt;p&gt;occurrences of first event: 2009-06-01 which is a Date&lt;/p&gt;
&lt;p&gt;occurrences of second event 2009-06-03T00:00:00+00:00 which is a
DateTime 2009-07-03T00:00:00+00:00 which is a DateTime
2009-08-03T00:00:00+00:00 which is a DateTime
2009-09-03T00:00:00+00:00 which is a DateTime
2009-10-03T00:00:00+00:00 which is a DateTime
2009-11-03T00:00:00+00:00 which is a DateTime
2009-12-03T00:00:00+00:00 which is a DateTime&lt;/p&gt;
&lt;p&gt;The first event gives a date dtstart because it has no
recurrence rules, the second event, which does have a recurrence
rule, is changing the type of the dtstart to DateTime. This should
be fixed.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-21T17:16:30-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">6</number>
      <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Occurence enumeration should preserve type of datetimes</title>
      <updated-at type="datetime">2009-05-21T17:16:31-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-21T18:19:38-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:milestone: 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer">40246</milestone-id>
      <number type="integer">6</number>
      <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Occurence enumeration should preserve type of datetimes</title>
      <updated-at type="datetime">2009-05-21T18:19:43-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
      <milestone-title>0.0.9</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-21T19:06:55-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">40246</milestone-id>
      <number type="integer">6</number>
      <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Occurence enumeration should preserve type of datetimes</title>
      <updated-at type="datetime">2009-05-21T19:06:57-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
      <milestone-title>0.0.9</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-21T19:20:51-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:state: resolved
</diffable-attributes>
      <milestone-id type="integer">40246</milestone-id>
      <number type="integer">6</number>
      <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>Occurence enumeration should preserve type of datetimes</title>
      <updated-at type="datetime">2009-05-21T19:20:55-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
      <milestone-title>0.0.9</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-21T19:31:37-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer">40246</milestone-id>
      <number type="integer">6</number>
      <permalink>occurence-enumeration-should-preserve-type-of-datetimes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Occurence enumeration should preserve type of datetimes</title>
      <updated-at type="datetime">2009-05-21T19:31:39-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6</url>
      <milestone-title>0.0.9</milestone-title>
    </version>
  </versions>
</ticket>
